
import request from '@/utils/request'

export function getMainListApi(params) {
  return request({
    url: '/device/maintain',
    method: 'get',
    params
  })
}
// 照片
export function upload(data) {
  return request({
    url: '/base/upload?field=maintain',
    method: 'post',
    data
  })
}

// 下拉菜单列表
export function getMainAllApi() {
  return request({
    url: '/community',
    method: 'get'
  })
}

// 增加分类
export function addMainApi(data) {
  return request({
    url: '/device/maintain',
    method: 'post',
    data
  })
}

// 点击修改回显
export function editMainApi(data) {
  return request({
    url: '/device/maintain/' + data.id,
    method: 'put',
    data
  })
}

// 获取行id
export function editMainId(id) {
  return request({
    url: '/device/maintain/' + id,
    method: 'get'
  })
}

// 删除
export function delMainApi(id) {
  return request({
    url: '/device/maintain/' + id,
    method: 'delete'
  })
}
